package org.tloss.web.editor.model.oper.logical;

import org.tloss.web.editor.utils.Constants;

public class IsNotNullOperator extends OneCompareOperatorSupport {

	public boolean supportTail() {
		return true;
	}

	@Override
	public String getDisplayText() {
		return " IS NOT NULL ";
	}
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		return true;
	}

	@Override
	public String generate(int type, Object[] data) {
		if(type ==  Constants.CodeType.JAVA){
			return " != null ";
		}else{
			return getDisplayText();
		}
	}
}
